package com.msg.chestionar.to;

import java.util.ArrayList;
import java.util.List;

public class IntrebareTO {

	private Long id;
	private Long chestionar_id;
	private String text;
	private int tip;
	private List<IntrebareOptiuneTO> optiuni;
	private RaspunsuriTO raspunsTO;
	private String raspuns;
	private Long raspunsRadioButton;
	private boolean markedForDelete;
	private int orderNo;
	private String nrRaspunsuri;
	
	public RaspunsuriTO getRaspunsTO(){
		return raspunsTO;
	}
	
	public void setRaspunsTO(RaspunsuriTO raspuns){
		this.raspunsTO = raspuns;
	}
	
	public int getOrderNo() {
		return orderNo;
	}

	public void setOrderNo(int orderNo) {
		this.orderNo = orderNo;
	}

	public IntrebareTO() {
		this.optiuni = new ArrayList<IntrebareOptiuneTO>();
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getChestionar_id() {
		return chestionar_id;
	}

	public void setChestionar_id(Long chestionarId) {
		chestionar_id = chestionarId;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public int getTip() {
		return tip;
	}

	public void setTip(int tip) {
		this.tip = tip;
	}

	public void setOptiuni(List<IntrebareOptiuneTO> optiuni) {
		this.optiuni = optiuni;
	}

	public List<IntrebareOptiuneTO> getOptiuni() {
		return optiuni;
	}

	public void setMarkedForDelete(boolean markedForDelete) {
		this.markedForDelete = markedForDelete;
	}

	public boolean getMarkedForDelete() {
		return markedForDelete;
	}

	public void setRaspuns(String raspuns) {
		this.raspuns = raspuns;
	}

	public String getRaspuns() {
		return raspuns;
	}

	public void setRaspunsRadioButton(Long raspunsRadioButton) {
		this.raspunsRadioButton = raspunsRadioButton;
	}

	public Long getRaspunsRadioButton() {
		return raspunsRadioButton;
	}

	public boolean getWithComment() {
		if (tip == 3) {
			for (IntrebareOptiuneTO opt : this.optiuni) {
				if (opt.getE_cu_comentariu())
					return true;
			}
		}
		return false;
	}

	public void setNrRaspunsuri(String nrRaspunsuri) {
		this.nrRaspunsuri = nrRaspunsuri;
	}

	public String getNrRaspunsuri() {
		return nrRaspunsuri;
	}


}
